<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3</title>
</head>
<body>
    <script src="vue.js"></script>
    <div id="app"><img :src="imgName" @mouseover="mouseOver" @mouseleave="mouseLeave"></div>
    <script>
       var app = new Vue({
            el:'#app',
            data:{
                imgName:"./imgs/goods001.jpg"
            },
            methods:{
                mouseOver(){
                    this.imgName = "imgs/goods002.jpg"
                },
                mouseLeave(){
                    this.imgName = "imgs/goods001.jpg"
                }
            }
       }) 
    </script>
</body>
</html>